x86: make SMEP/SMAP suppression tolerate NMI/MCE at the "wrong" time
authorJan Beulich <jbeulich@suse.com>
Tue, 17 May 2016 14:42:15 +0000 (16:42 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 17 May 2016 14:42:15 +0000 (16:42 +0200)
commit9e28baf22ec98a64f68757eff39df72173d5f1bb
tree87f236828eeff4454cb97486c57715298f137925
parente5e73163ec40b409151f2170d8e406a72b515ff2
x86: make SMEP/SMAP suppression tolerate NMI/MCE at the "wrong" time

There is one instruction boundary where any kind of interruption would
break the assumptions cr4_pv32_restore's debug mode checking makes on
the correlation between the CR4 register value and its in-memory cache.
Correct this (see the code comment) even in non-debug mode, or else
a subsequent cr4_pv32_restore would also be misguided into thinking the
features are enabled when they really aren't.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
xen/arch/x86/x86_64/compat/entry.S